﻿/********************************************************************************************************************
* Author:	Christos Polydorou																						*
* Email:	std04237@di.uoa.gr																						*
* Purpose:	This script is used in order to create the stored procedure "usp_category_getmoderators" that returns	*
*			the moderators of a category.																			*
********************************************************************************************************************/

CREATE PROCEDURE [dbo].[usp_category_getmoderators]
	@categoryid bigint
AS
	SELECT users.username
	FROM Users, [category-moderator]
	WHERE users.username = [category-moderator].moderator and [category-moderator].categoryid = @categoryid
RETURN 0